package com.eati.cm.serv_impl;

import com.eati.cm.model.readonly.Gender;
import com.eati.cm.repo.GenderRepo;
import com.eati.cm.serv.IGenderServ;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GenderServ implements IGenderServ {
    @Autowired
    GenderRepo genderRepo;

    @Override
    public Gender findById(long id) {
        return genderRepo.findById(id).get();
    }

    @Override
    public List<Gender> findAll(){
        return genderRepo.findAll();
    }
}
